package com.mytomcat.config;

/**
 * Servlet映射对象
 */
public class ServletMapping {
    /**
     * Servlet名称 可有可无
     */
    private String servletName;

    /**
     * 接口api 不能重复
     * /* 表示任何接口都能调用
     */
    private String urlPattern;

    private String className;

    public ServletMapping() {
    }

    public ServletMapping(String servletName, String urlPattern, String className) {
        this.servletName = servletName;
        this.urlPattern = urlPattern;
        this.className = className;
    }

    public String getServletName() {
        return servletName;
    }

    public void setServletName(String servletName) {
        this.servletName = servletName;
    }

    public String getUrlPattern() {
        return urlPattern;
    }

    public void setUrlPattern(String urlPattern) {
        this.urlPattern = urlPattern;
    }

    public String getClassName() {
        return this.className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    @Override
    public String toString() {
        return "ServletMapping{" +
                "servletName='" + servletName + '\'' +
                ", urlPattern='" + urlPattern + '\'' +
                ", className='" + className + '\'' +
                '}';
    }
}
